<?php
function set_ftp() {
    /**
     * Created by PhpStorm.
     * User: 123456
     * Date: 2018/9/20
     * Time: 14:07
     */
    declare(strict_types = 1);
    include 'Ftp.php';
    $config = [
        'host' => 'qxu1142290140.my3w.com',
        'user' => 'qxu1142290140',
        'pass' => 'dJtNt62z6D'
    ];
    $ftp = new Ftp($config);
    $result = $ftp->connect();
    if (!$result) {
        echo $ftp->get_error_msg();
    }

    $local_file = 'D:\soft\XAMMP5.6\htdocs\tp5\application\index\controller\cs.php';
    $remote_file = 'htdocs/ceshi/order.php';

//上传文件
    if ($ftp->upload($local_file, $remote_file)) {
        echo "上传成功";
    } else {
        echo "上传失败";
    }
}